﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="AddEmployees.aspx.cs" Inherits="Admin_Employees" EnableViewState="true" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPlace" runat="Server">
    <div>
        <asp:Label runat="server" ID="lblPageName"></asp:Label><br />
        <asp:TextBox ID="txtPageTitle" runat="server" Width="400px"></asp:TextBox><br />
        <asp:Label runat="server" ID="lblKeywords"></asp:Label><br />
        <asp:TextBox ID="txtKeywords" runat="server" Width="400px"></asp:TextBox><br />
        <asp:Label runat="server" ID="lblDescription"></asp:Label><br />
        <asp:TextBox ID="txtDescription" runat="server" Width="400px"></asp:TextBox><br />
        <asp:Button ID="btnArticleSave" runat="server" Text="Сохранить" OnClick="btnArticleSave_Click" />
        <asp:GridView runat="server" ID="dgEmployees" AutoGenerateColumns="false" OnRowEditing="dgEmployees_RowEditing"
            OnRowCancelingEdit="dgEmployees_RowCancelingEdit" OnRowUpdating="dgEmployees_RowUpdating" ShowFooter="true"
            OnRowDeleting="dgEmployees_RowDeleting" OnRowDataBound="dgEmployees_DataBinding" AllowPaging="false">
            <EmptyDataTemplate>
            <table>
                <tr style="background-color: #808080">
                    <td style="color: White; font-weight: bold;">
                        פעולות
                    </td>
                    <td style="color: White; font-weight: bold;">
                        שם של הכישור
                    </td>
                    <td style="color: White; font-weight: bold;">
                        הניווט
                    </td>
                </tr>
                <tr style="background-color: #CCCC99">
                    <td>
                       <%-- <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Create"
                            Text="הוסף" OnClick="LinkButton1_Click"></asp:LinkButton>--%>
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddLinkName" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddLink" runat="server"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <div>
                            <%=FUNC.GetPhrase(21) %></div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HiddenField runat="server" ID="hfID" Value='<%# Eval("ID") %>' />
                        <img alt="photo" src='../Content/galery/<%# Eval("ImagePath") %>'/>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:HiddenField runat="server" ID="hfID" Value='<%# Eval("ID") %>' />
                        <asp:HiddenField runat="server" ID="hfFileName" Value='<%# Eval("ImagePath") %>' />
                        <asp:FileUpload runat="server" ID="uplPhoto" />
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:FileUpload runat="server" ID="uplPhoto" />
                    </FooterTemplate>
                </asp:TemplateField>
                  <asp:TemplateField>
                    <HeaderTemplate>
                        <div>
                            <%=FUNC.GetPhrase(10) %></div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblName" Text='<%# Eval("Name") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtName" runat="server" Height="150px" Width="450px" Text='<%# Helper.ConvertStringFromSql(Eval("Name").ToString()) %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtName" runat="server" Text=""></asp:TextBox>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="550px">
                    <HeaderTemplate>
                        <div>
                            <%=FUNC.GetPhrase(11) %></div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblText" Text='<%# Eval("Context")  %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtContent" runat="server" Height="150px" Width="450px" TextMode="MultiLine" Text='<%# Helper.ConvertStringFromSql(Eval("Context").ToString())%>'></asp:TextBox>
                    </EditItemTemplate>
                     <FooterTemplate>
                        <asp:TextBox ID="txtContent" runat="server" Height="150px" Width="450px" TextMode="MultiLine" Text=""></asp:TextBox>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <div>
                            <%=FUNC.GetPhrase(20) %></div>
                    </HeaderTemplate>
                    <ItemTemplate>
                       <asp:Button ID="btnChange" runat="server" Text="Изменить" CommandName="Edit" />
                       <asp:Button ID="btnDelete" runat="server" Text="Удалить" CommandName="Delete" />
                       <asp:ImageButton runat="server" ToolTip="Click to move this row up" ImageUrl="Images/MoveUp.png"
                        ID="btnUp" OnCommand="dgEmployees_ItemCommand" CausesValidation="false" CommandName="MoveUp"
                        CommandArgument='<%# Eval("ID") %>' />
                    <asp:ImageButton runat="server" ToolTip="Click to move this row down" ImageUrl="Images/MoveDown.png"
                        CommandName="MoveDown" ID="btnDown" OnCommand="dgEmployees_ItemCommand" CommandArgument='<%# Eval("ID") %>' />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Button ID="btnCancel" runat="server" Text="Назад" CommandName="Cancel" />
                       <asp:Button ID="btnSave" runat="server" Text="Сохранить" CommandName="Update" />
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:Button ID="btnFooterSave" runat="server" Text="Добавить" OnClick="btnFooterSave_Click" />
                    </FooterTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
